﻿@model SuperJ.Web.Areas.Admin.Models.Announce


@using (Html.BeginForm()) 
{
    @Html.AntiForgeryToken()
    <div class="row">
        <div class="col-xs-12">
            <div class="form-horizontal" role="form">
                <h4>Announce</h4>
                <hr />
                @Html.ValidationSummary(true, "", new { @class = "text-danger" })
                <div class="form-group">
                    @Html.LabelFor(model => model.Title, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-6">
                        @Html.EditorFor(model => model.Title, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.Title, "", new { @class = "text-danger" })
                    </div>
                </div>

                <div class="form-group">
                    @Html.LabelFor(model => model.FullContent, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-6">
                        @Html.EditorFor(model => model.FullContent, new { htmlAttributes = new { @class = "form-control summernote", @id = "editor" } })
                        @Html.ValidationMessageFor(model => model.FullContent, "", new { @class = "text-danger" })
                    </div>
                </div>
                
                <div class="form-group">
                    @Html.LabelFor(model => model.CreateTime, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-6">
                        @Html.EditorFor(model => model.CreateTime, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.CreateTime, "", new { @class = "text-danger" })
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-md-offset-2 col-md-10">
                        <button type="submit" value="确定" class="btn btn-info">
                        <i class="ace-icon fa fa-check bigger-110"></i>确定
                        </button> &nbsp; &nbsp; &nbsp;
                        <button class="btn" type="reset">
                            <i class="ace-icon fa fa-undo bigger-110"></i>
                            取消
                        </button>
                    </div>
                </div>
            </div>
        </div>

    </div>
    
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
<script type="text/javascript">
    $(document).ready(function () {
        $('#editor').summernote({
            height: 200,
            tabsize: 2,
            codemirror: {
                theme: 'monokai'
            }
        });
    });
</script>